from abc import ABC,abstractmethod
from collections import defaultdict

class BaseOSS(ABC,object):

    @abstractmethod
    def get_url(self,key,expired=120)->str:
        pass 

    @abstractmethod
    def get_cdn_url(self,key,expired=120)->str:
        pass 

    @abstractmethod
    def save_file(self,key,_file)->defaultdict:
        pass 

    @abstractmethod
    def download_file(self,key)->any:
        pass 

    @abstractmethod
    def delete_file(self,key)->any:
        pass 

    @abstractmethod
    def set_object_meta(self,key,content_type):
        pass 